package com.nengchuan.eic.nceconomy.dao;

import com.nengchuan.eic.nceconomy.constant.RoleEnum;
import com.nengchuan.eic.nceconomy.entity.dto.OrgInfoDTO;
import com.nengchuan.eic.nceconomy.entity.po.UserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nengchuan.eic.nceconomy.entity.vo.ProjectInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author luoping
 * @since 2020-04-26
 */
@Repository
public interface UserRoleMapper extends BaseMapper<UserRole> {
    List<OrgInfoDTO.ManagerDTO> getByRoleCodeAndOrgIdIn(@Param("orgIds") List<Long> orgIds,@Param("roleCode")List<String> roleCode);

    List<ProjectInfo.Person> getRoleInfoByOrgIdOrOrgCode(@Param("orgId")Long orgId, @Param("orgCode") Integer orgCode);

    UserRole getRoleInfoByOrgIdAndRole(@Param("orgId")Long supervisionUnitId, @Param("role") String role);
}
